package com.telecom.entity;

import lombok.Data;

@Data
public class Passenger {
    private String name;
    private String start;
    private String end;
    private Subway subway;

    public void takeBy() {
        int charge = subway.charge(start, end);
        System.out.println(name+"乘车从"+start+"到"+end+"，收费"+charge);
    }
}
